package com.tckdq.tcc.feign;

import com.tckdq.tcc.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "service-course",fallbackFactory = CourseFeignFallbackFactory.class)
public interface CourseFeign {

    //根据课程ID查询课程的状态： 是否免费，是否购买，是否上线
    @RequestMapping(value="course/status/{id}",method= RequestMethod.GET)
    public JsonResult selectCourseStatusForUser(@PathVariable("id")Long id);

    /*course/course/courseOrderDetail/ 课程订单详情*/
    @RequestMapping(value = "course/courseOrderDetail/{courseStrIds}",method = RequestMethod.GET)
    public JsonResult selCourseForOrder(@PathVariable("courseStrIds")String courseStrIds);
}
